package com.ruoyi.common.log.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName sys_plantation
 */
@TableName(value ="sys_plantation")
@Data
public class SysPlantation implements Serializable {
    /**
     * 种植基地主键
     */
    @TableId(type = IdType.AUTO)
    private Integer plantationId;

    /**
     * 种植基地名字
     */
    private String name;

    /**
     * 种植基地总面积
     */
    private Integer acreage;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysPlantation other = (SysPlantation) that;
        return (this.getPlantationId() == null ? other.getPlantationId() == null : this.getPlantationId().equals(other.getPlantationId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getAcreage() == null ? other.getAcreage() == null : this.getAcreage().equals(other.getAcreage()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPlantationId() == null) ? 0 : getPlantationId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getAcreage() == null) ? 0 : getAcreage().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", plantationId=").append(plantationId);
        sb.append(", name=").append(name);
        sb.append(", acreage=").append(acreage);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}